const mongoose = require('mongoose')

const schema = new mongoose.Schema({
    title: { type: String },
    introduction: { type: String },
    author: { type: String },
    weight: { type: Number },
    body: { type: String, select: false },
    coverImg: { type: String },
    commentNum: { type: Number },
    voteNum: { type: Number },
}, { timestamps: true }
)

module.exports = mongoose.model('Article', schema);